﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpModelInterface.h"
#include "IElementViewSpecificShapeComponent.h"

namespace gcmp {

    class IModelView;
    class IGraphicsElementShape;

        /// \brief instance视图相关的行为
    class GCMP_MODEL_INTERFACE_EXPORT IInstanceViewSpecificShapeComponent : public IElementViewSpecificShapeComponent
    {
        DEFINE_CAST_DERIVED(gcmp::IInstanceViewSpecificShapeComponent, gcmp::IElementViewSpecificShapeComponent);
    public:
        /// \brief 更新不受视图范围影响的视图grep
        /// 其内部会把族的instanceModelViewGreps中的参考平面生成对应的投影线并添加到参数opModelViewGrep中
        /// 平台内部在modelview中确定所需最终显示的grep后，会调用该函数，添加相应的参考平面用于最终显示。
        /// 平台默认的IInstanceViewSpecificShapeComponent会默认调用该函数，若产品自己实现则可视需求自由决定是否在生成grep后调用该函数
        /// \param pModelView Modelview指针
        /// \param opModelViewGrep 输出参数，所需修改的grep
        /// \return true 表示更新, false 表示未更新
        virtual bool UpdateModelViewGrepWithViewRangeIndependentGrep(const IModelView* pModelView, OwnerPtr<IGraphicsElementShape>& opModelViewGrep) const = 0;

        /// \brief 析构函数。
        virtual ~IInstanceViewSpecificShapeComponent() {};
    };  
}